﻿using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("WebAppCasePermissions")]
    public class CasePermission : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [References(typeof(User))]
        public long UserId { get; set; }

        [Required]
        [References(typeof(Case))]
        public long CaseId { get; set; }

        [Default(typeof(int), "0")]
        public PermissionType Permission { get; set; }

        [Ignore]
        public User User { get; set; }

        [Ignore]
        public Case Case { get; set; }
    }
}